﻿using Coldairarrow.Entity;
using Coldairarrow.Util;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace Coldairarrow.Business
{
    public interface IOutbound_DetailsBusiness
    {
        Task<PageResult<Outbound_Details>> GetDataListAsync(PageInput<ConditionDTO> input);
        Task<Outbound_Details> GetTheDataAsync(string id);
        Task AddDataAsync(Outbound_Details data);
        Task UpdateDataAsync(Outbound_Details data);
        Task DeleteDataAsync(List<string> ids);
        Task outBound(Outbound_Details _Details);

        /// <summary>
        /// 获取出库明细
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<PageResult<OutDetailDTO>> GetDataTwo(PageInput<Outbound_DetailsDto> input);

        /// <summary>
        /// 获取出库统计
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<PageResult<Outbound_Infor>> GetDatastationTwo(PageInput<Outbound_DetailsDto> input);

    }

    public class OutDetailDTO:Outbound_Details
    { 
        public string OrderUserId { get; set; }

        public string OrderUserNickName{ get; set; }

        public string OrderUserRealName { get; set; }

        public string OrderUserPhone { get; set; }

    }

    public class Outbound_DetailsDto
    {
        public string productName { get; set; }
        public DateTime startTime { get; set; }

        public DateTime endTime { get; set; } = DateTime.Now;
    }
    /// <summary>
    /// 统计参数
    /// </summary>
    public class Outbound_Infor
    {
        /// <summary>
        /// 入库ID
        /// </summary>
        public string Id { get; set; }
        public string ProductId { get; set; }
        public string productName { get; set; }
        public string ProductsId { get; set; }
        public string productsName { get; set; }

        public string CreateTime { get; set; }
        /// <summary>
        /// 出库次数
        /// </summary>
        public string PutCount { get; set; }
        /// <summary>
        /// 出库量
        /// </summary>
        public string PutNum { get; set; }
       
    }

}